<?
	$pageSize = 4;
	$pageNum = 1;
	
    if (isset($_GET['pageNum'])==true) $pageNum = $_GET['pageNum'];
	
	$totalRows = 0;
	$sanpham=$t->get_phantrang_order($pageNum,$pageSize,$totalRows,"sanpham",-1,1," order by thutu desc");
	if($keyword=='') $keyword=0;
?>

<div class="right" style="border-radius:5px 5px 5px 5px;">
<div class="title_right">
	<h1><?=$language[$lang]['sanphamtieubieu'];?></h1>
</div>
<div class="content_right" style="text-align:center;">
    <div style="width:640px;float:left;margin-left:18px;">
    	<? while($row_nb=mysql_fetch_assoc($sanpham)){?>
        <?
				$idcl=$row_nb['idcl'];
				$idloai=$row_nb['idloai'];
				$cl=$t->get_by_thutu("sanpham_chungloai",$idcl);
				$loai=$t->get_by_thutu("sanpham_loai",$idloai);
				$row_cl=mysql_fetch_assoc($cl);
				$row_loai=mysql_fetch_assoc($loai);
	?>
    	<div style="width:640px;float:left;padding-bottom:10px;padding-top:5px;text-align:left">
        	<div style="float:left;width:260px;">
            <a href="<?=$rooturl?><?=$list['3']['alias'];?>/<?=convert($row_cl['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_nb['ten_'.$lang])?>-<?=$row_nb['id']?>.html">
            <img src="<?=$row_nb['url_img']?>" style="max-width:260px;" />
            </a>
            </div>
            <div style="float:right;width:370px;">
            	<div style="float:left;width:370px;text-align:left;">
                	<table width="370">
                    	<tr>
                        	<td width="180" style="color:#9e0101;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['masanpham'];?>
                            </td>
                            <td>
                            	<?=$row_nb['code']?>
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" style="color:#9e0101;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['tensanpham'];?>:
                            </td>
                            <td>
                            	<?=$row_nb['ten_'.$lang]?>
                            </td>
                        </tr>
                    </table>
                </div>
                <div style="float:left;width:370px;margin-top:25px;text-align:left;">
                	<table width="370">
                    	<tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['dongia'];?>:                            </td>
                            <td>
                            	
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['dungtich'];?>:                            </td>
                            <td>
                            	<?=$row_nb['dungtich']?>
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['soluong'];?>:                            </td>
                            <td>
                            	<?=$row_nb['soluong_'.$lang]?>
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['sanxuat'];?>:                            </td>
                            <td>
                            	<?=$row_nb['sanxuat']?>
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['giayphep'];?>:                            </td>
                            <td>
                            	<?=$row_nb['giayphep']?>
                            </td>
                        </tr>
                        <tr>
                        	<td width="180" valign="top" style="color:#2077b0;font-weight:bold;padding:4px 0px">
                            	<?=$language[$lang]['congdung'];?>:                            </td>
                            <td>
                            	<?=$row_nb['tomtat_'.$lang]?>
                            </td>
                        </tr>
                  </table>
                </div>
            </div>
        </div>
    <div style="width:100%;float:left;height:12px ;background:url(images/bg_cach_right.png) top center no-repeat;"></div>
	<? }?>
    </div>
    <div class="showpageArea" style="text-align:right;">
        <?php echo $t->pagesList1($rooturl.$_GET['a'],$totalRows,$pageNum,$pageSize,5); ?>
</div>
</div>
</div>
